package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Set;

@TableName("t_user")
public class UserBean {
    /**
     * 编号
     */
    @TableId(value = "pk_userId", type = IdType.AUTO)
    private Integer id;
    /**
     * 用户名
     */
    @TableField(value = "u_userName")
    private String userName;
    /**
     * 密码
     */
    @TableField(value = "u_pwd")
    private String password = "666";
    /**
     * 真实姓名
     */
    @TableField(value = "u_realName")
    private String realName;
    /**
     * 角色集合
     */
    @TableField(exist = false)

    private Set<RoleBean> roleSet;
    /**
     * 权限集合
     */
    @TableField(exist = false)
    private Set<GradeBean> gradeSet;

    public UserBean() {
    }

    @Override
    public String toString() {
        return "UserBean{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", realName='" + realName + '\'' +
                ", roleSet=" + roleSet +
                ", gradeSet=" + gradeSet +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public Set<RoleBean> getRoleSet() {
        return roleSet;
    }

    public void setRoleSet(Set<RoleBean> roleSet) {
        this.roleSet = roleSet;
    }

    public Set<GradeBean> getGradeSet() {
        return gradeSet;
    }

    public void setGradeSet(Set<GradeBean> gradeSet) {
        this.gradeSet = gradeSet;
    }
}
